import { Directive, ElementRef } from '@angular/core';

@Directive({
  selector: '[appMyDerirective01]',
  standalone: true
})
export class MyDerirective01Directive {

  constructor(el: ElementRef) {
    // el.nativeElement.style.color = 'red';
    alert(1)

    // el.nativeElement.style.display = 'none';

    let permission = el.nativeElement.getAttribute('permission')
    console.log(el.nativeElement.getAttribute('permission'))
    if (permission && permission == 'sunshine') {
      el.nativeElement.style.display = 'none';
    } else {
      // el.nativeElement.style.display = 'none';
    }
  }

}
